In video graphics applications, many techniques are used to render graphical images of different shapes and sizes. Typically, graphical images are made up of thousands, or even millions, of primitive shapes such as triangles. Each triangle is defined by the coordinates of its vertices. In order to enhance the three-dimensional aspects of a graphical rendering, texture may be added to each of the triangles or other drawing units. Texture coordinates are used to assign texture maps to each object as it is rendered on a display device. A texture map is an array of texture elements (texels) combined to form a standard block of texture.
Mapping textures to rendered objects can be complicated by the depths (i.e., distances relative to the viewer) of the various objects in a rendered scene. The orientation of the rendered objects can also affect the complexity of mapping the textures to the rendered objects. Furthermore, applying texture to a single object can be complicated if the object varies in depth and orientation on the display device.
Mipmapping is one conventional technique used to apply different texture maps, each having a corresponding level of detail (LOD), to such objects. Mipmapping prefilters a texture map and stores the different prefiltered versions, or levels, to decrease the complexity of texture minification calculations. Texture minification refers to minimizing a prefiltered texture map with a standard level of detail to correlate multiple texels to a single pixel because the rendered object is miniaturized on the display device to appear far away. In contrast, texture magnification refers to correlating the texture level of detail to an object that is magnified on the display device to appear relatively close to the viewer. However, it should be noted that texture filtering also may be used with texture magnification because the pixels may be misaligned relative to the texels of a particular texture map.
A texture level of detail computation is implemented to determine which texture map to use to apply texture to a particular rendered object. In general texture maps with greater detail (sometimes designated as “level 0”) are used for close objects, and texture maps with less detail (sometimes designated as “level 1,” “level 2,” “level 3,” and so on) are used for farther objects.
A conventional two-dimensional (2D) texture level of detail computation implements two multiply operations, two square operations, one add operation, and one square root operation for each of two log terms in order to calculate the expected value. Similarly, a conventional three-dimensional (3D) texture level detail computation implements three multiply operations, three square operations, two add operations, and one square root operation for each of three log terms. Since these computations are often performed in 32 bit floating point space, these conventional texture level of detail computations are expensive to implement in hardware.